/*
 * @Author: 陈永浩(cyh1231wp@163.com)
 * @Date: 2020-11-02 23:23:17
 * @LastEditors: 陈永浩(cyh1231wp@163.com)
 * @LastEditTime: 2021-03-02 18:26:43
 */
import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export const constantRoutes = [
  {
    path: '*',
    name: '404',
    component: () => import('@/views/404'),
  },
  {
    path: '/401',
    name: '401',
    component: () => import('@/views/401'),
  },
  {
    path: '/',
    name: 'index',
    component: () => import('@/views/index'),
    children: [
      {
        path: '/startup',
        name: 'startup',
        component: () => import('@/views/pages/startup'),
      },
      {
        path: '/setup',
        name: 'setup',
        component: () => import('@/views/pages/setup'),
      },
    ]
  },
]

const router = new VueRouter({
  routes: constantRoutes
})

export default router
